The present disclosure relates to a methodology for improving the print quality of line-art corners and other fine details as found in both font and image data. More specifically, this disclosure relates to corner sharpening via look-up table based edge detection in digital image processing.
In the printing arts, sharpening of corners has been found to be desirable due to the fact that because marking and imaging processes can round off corners and make font serifs short and blunt. Further, it may be desirable to sharpen such features due to human observer appearance preferences. In the printing arts, this problem was typically overcome by manual image customization by hand of any troublesome detail areas. This was particularly the case with fonts or reusable type. For example, ink traps would be added to those areas in a font character where too much ink would otherwise collect and cause smearing. Similarly, detail areas would be sharpened to insure the desired print result.
This approach of compensating to get a desired result such as sharpening has followed-on from the print arts into the digital imaging arts. As an example, Digital Typography: An Introduction to Type and Composition for Computer System Design, by Richard Rubinstein, discusses the desirability of compensating for electrostatic effects which result in toner not being placed on the paper exactly as the bit image specifies. Compensation is depicted there as adding to the image bit map to sharpen convex (outside) corners which would otherwise get rounded over. An alternative compensation is also depicted for handling situations involving concave (inside) corners by removing black printing pixels from the corner region of a shape to make an ink trap. In FIG. 9 there is depicted the bit image data and thereby the desired print image. In FIG. 10 is depicted the rounded-over result when printed on a given printer. FIG. 11 shows the bit image compensation which when printed will yield the desired result as depicted in FIG. 9 above. Note the ears 2000 added to the outside corners and the ink trap 2010 added to address the inside corner. The above figures and discussion are further developed in U.S. Patent Publication No. 2005/0129328 entitled “CORNER SHARPENING OF TEXT AND LINE ART IN A SUPER RESOLUTION ANTI-ALIASING IMAGE PATH” to inventors Eli S. Saber, and Robert P. Loce, which is herein incorporated by reference in its entirety for its teachings.
An edge within an image is a sharp change in local intensity or lightness. In other words, edges are features within an image that possess strong intensity contrast. Edges occur between distinct objects in a scene, or within textures and structures within an object. For instance, typographic characters on a white page background produce distinct edges. Edge pixels in a digital image are those pixels that occur at and about an edge in the image.
Two key properties of an edge are strength and orientation. Edge strength is a measure of the contrast of an edge. A black typographic character on a white background produces stronger edges than a gray character on a white background. Edge orientation can be described by a variety of measures, such as angle quantified in degrees or by classes such as vertical, horizontal, and diagonal.
Other attributes of edges are also useful to image analysis and image processing. For instance, classification of combined edges, such as corners, has been used in object recognition and in image enhancement applications. Edge thickness is a measure that provides information on the breadth of a local contrast change and can indicate a degree of blur in an image, see for example: U.S. Pat. No. 6,763,141, entitled “ESTIMATION OF LOCAL DEFOCUS DISTANCE AND GEOMETRIC DISTORTION BASED ON SCANNED IMAGE FEATURES,” to inventors B. Xu, R. Loce, which is hereby incorporated in its entirety for its teachings. Inner edges and outer edges refer to regions just inside of or just outside of a given object, respectively, and have been used in applications such as character stroke thinning and thickening. The presence or absence of an edge is an edge-related property that has been used in applications such as image classification and recognition. Distance from an edge is also an edge-related property that has been used in image enhancement applications.
Edge detection in digital image processing typically employs a collection of methods used to identify or modify edge pixels or indicate properties of edges and edge pixels within an image. Edge detection methods are sometimes referred to simply as edge detectors. There are numerous applications of edge detectors in digital image processing for electronic printing. For example, identification of corner pixels has been used to sharpen corners within an image, see: U.S. Pat. No. 6,775,410, entitled “IMAGE PROCESSING METHOD FOR SHARPENING CORNERS OF TEXT AND LINE ART,” to inventors R. Loce, X. Zhu, C. Cuciurean-Zapan. Identification of inner and outer border pixels has been used to control the apparent darkness of character strokes, see: U.S. Pat. No. 6,606,420, entitled “METHOD AND APPARATUS FOR DIGITAL IMAGE DARKNESS CONTROL IN SATURATED IMAGE STRUCTURES”, to Loce et al; and U.S. Pat. No. 6,181,438, entitled “METHOD AND APPARATUS FOR DIGITAL IMAGE DARKNESS CONTROL USING QUANTIZED FRACTIONAL PIXELS,” to Bracco et al. Also identification of anti-aliased pixels has been used for preferred rendering of those same pixels, see: U.S. Pat. No. 6,243,499, entitled “TAGGING OF ANTIALIASED IMAGES,” to Loce, et al.; U.S. Pat. No. 6,144,461, entitled “METHOD FOR GENERATING RENDERING TAGS TO FACILITATE THE PRINTING OF ANTIALIASED IMAGES,” to Crean, et al.; and U.S. Pat. No. 6,167,166, entitled “METHOD TO ENABLE THE RECOGNITION AND RENDERING OF ANTIALIASED IMAGES,” to Loce et al. All of the above cited are hereby incorporated by reference in their entirety for their teachings.
Edge detectors typically operate using a convolution mask and are based on differential operations. Differentials for edge/line detection are used to define color or brightness changes of pixels and their change directions. If there is an abrupt change of brightness within a short interval within an image, it means that within that interval there is high probability that an edge exists. One example of a convolution-based edge detector is the Roberts edge detector, which employs the square root of the magnitude squared of the convolution with the Robert's row and column edge detectors. The Prewitt edge detector employs the Prewitt compass gradient filters and returns the result for the largest filter response. The Sobel edge detector operates using convolutions with row and column edge gradient masks. The Marr-Hildreth edge detector performs two convolutions with a Laplacian of Gaussians and then detects zero crossings. The Kirsch edge detector performs convolution with eight masks that calculate gradient.
As indicated above, common edge detection methods employ a convolution-type computing architecture, usually with fixed coefficients. In the field of image processing, and in particular, for image processing in anticipation of electronic printing, the edge detection needs are numerous and varied. Further, image processing for electronic printing often requires that any processing method operates “real-time,” within a small number of fixed clock cycles, thereby excluding more complicated methods as too computationally intensive.
What is needed is a technique which will solve the problem of corner rounding as an automated, non-manual processing operation with a computing architecture that is more readily adapted to a wide variety of corner detection needs than are the common convolution-based methods, and which can be readily adapted to real-time applications.
Disclosed in embodiments herein is a method for corner sharpening in the display of a bitmapped digital image. The method comprises selecting a target pixel location within the digital image; observing a set of pixels within a pixel observation window superimposed on the digital image relative to the target pixel location; generating edge-state codes for a plurality of pairs of neighboring vectors of pixels within the pixel observation window; generating corner-identification codes from the plurality of edge-state codes using at least one look-up table so as to thereby identify corner pixels; and assigning a pixel value in an output image plane in a location corresponding to the target pixel in the input image, such that that assigned value extends a corner where indicated by a corner identification code, thereby producing a sharpening effect.
Further disclosed in embodiments herein is a method for producing corner sharpened image data from binary digital image data. The method comprises observing a set of pixels about a target pixel within a pixel observation window superimposed on the binary digital image relative to the target pixel location; generating sums of weighted pixel values, where the sums are taken over at least first-orientation vectors and second-orientation vectors of pixels that run through the observation window; generating sum-to-sum differences for neighboring pairs of said first-orientation vectors of pixels and second-orientation vectors of pixels; generating edge-state codes for each pair of the neighboring first-orientation vectors of pixels and second-orientation vectors of pixels by using one or more bits to encode a magnitude and one bit to encode a sign; generating a first-orientation edge identification code and second-orientation edge identification code by using a plurality of said respectively oriented encoded edge-state codes, where the bits of the edge-state codes are combined to form an index that addresses a respective orientation look-up table that maps multiple encoded edge states to a respective orientation edge identification code; generating an overall corner identification code by using edge identification codes for the at least two orientations of vectors, wherein the bits that form the corner identification codes for the at least two orientations of vectors are combined to form an index that is used to address an overall corner identification look-up table; and, assigning a pixel value in an output image plane in a location corresponding to the target pixel in the input image, such that that assigned value extends a corner where indicated by a corner identification code, thereby producing a sharpening effect.
Further disclosed in embodiments herein is a method for producing corner sharpened image data from continuous tone digital image data. The method comprises selecting a target pixel location within the continuous tone image; observing a set of pixels within a pixel observation window superimposed on the continuous tone image relative to the target pixel location; generating edge-state codes for a plurality of pairs of neighboring vectors of pixels within the pixel observation window; generating a corner-identification code from the plurality of edge-state codes using at least one look-up table so as to thereby identify corner pixels; and, assigning a pixel value in an output image plane in a location corresponding to the target pixel in the input image, such that that assigned value extends a corner where indicated by a corner identification code, thereby producing a sharpening effect.